import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/data'
        },
        {
            path: '/',
            component: () => import('../components/common/Home.vue'),
            meta: { title: '自述文件', requireAuth: true },
            children: [
                {
                    path: '/data',
                    component: () => import( '../components/page/Data.vue'),
                    meta: { title: '数据表格', requireAuth: true }
                },
            ]
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
